package com.wdl.fmnew.core.di.component;

import android.app.Application;

import com.wdl.fmnew.core.base.BaseApplication;
import com.wdl.fmnew.core.di.module.ApplicationModule;
import com.wdl.fmnew.core.net.ApiServiceModule;
import com.wdl.fmnew.core.net.NetModule;

import javax.inject.Singleton;

import dagger.BindsInstance;
import dagger.Component;
import dagger.android.AndroidInjector;
import dagger.android.support.AndroidSupportInjectionModule;
import dagger.android.support.DaggerApplication;

/**
 * Created by wdl on 2017/9/16.
 */

@Singleton
@Component(modules = {ApplicationModule.class, ActivityBindingModule.class, NetModule.class, ApiServiceModule.class, AndroidSupportInjectionModule.class})
public interface AppComponent extends AndroidInjector<DaggerApplication> {
    void inject(BaseApplication application);

    @Override
    void inject(DaggerApplication daggerApplication);

    @Component.Builder
    interface Builder {
        @BindsInstance
        AppComponent.Builder application(Application application);

        AppComponent build();
    }
}
